<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body style="height: 3000px">
  <div id="app">
    <common-head></common-head>
  </div>
  <script src="./vue.js"></script>
  <script src="./axios.js"></script>
  <script>
    const CommonLogo = {
      template: `
        <div>
          <header>这是头部</header>  
          <slot name="a"></slot>
          <footer>这是尾部</footer>  
          <slot name="b"></slot>
        </div>
      `
    }
    const CommonHead = {
      template: `
        <div>
          <h1>这是公共组件</h1>
          <common-logo>
            <div slot="a">
              <button>按钮</button>  
            </div>  
            <div slot="b">
              <mark>按钮</mark>  
            </div>  
          </common-logo>
         
        </div>
      `,
      components: {
        CommonLogo
      }
    }
    Vue.component('CommonHead', CommonHead)
    const vm = new Vue({
      el: '#app'
    })


  </script>
</body>
</html>